The present invention relates in general to data processing systems and in particular to distributed caches. Still more particularly, the present invention relates to an improved method and system for proactively monitoring the coherency of a distributed cache.
Distributed applications utilize multiple interconnected caches to improve performance characteristics, such as response time. Distributed caches are typically located in multiple servers. Ideally, each cache within a distributed cache system is identical. However, users may often want to check one or more caches to ensure that the caches are all identical (e.g., when troubleshooting a problem).
Conventional methods of comparing caches, such as comparing the overall sizes of the caches and/or comparing multiple cache keys within each cache, are not completely accurate. These conventional methods do not take into account individual cache values that may have been changed independently of the cache keys. Other conventional cache comparison methods, such as comparing all values within each cache individually, are very thorough but also take a lot of time to execute. Furthermore, the time required to thoroughly compare all individual values increases dramatically as the number of caches being compared increases.